<!doctype html>
<html>
<head>
  <meta charSet="utf-8"/>
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, minimum-scale=1.0"/>
  <title>kafka click log</title>
</head>
<body>
  <button onclick="lk('login')">登录</button>
  <button onclick="lk('click')">点击</button>
  <button onclick="lk('jobCollect')">收藏</button>
  <button onclick="lk('cvSend')">投简历</button>
  <button onclick="lk('cvUpload')">上传简历</button>


  <script type="text/javascript" src='https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js'></script>
  <script>
    function lk(_action){
        var info = {};
        info.userId = 123;
        info.actTime = new Date();
        info.action = _action;
        info.jobCode = "lagou";
        $.ajax({
            type: "post",
            url: "http://linux123/log",
            data: JSON.stringify(info),
            success: function(res){
            }
        });
    }
  </script>
</body>
</html>